package com.yikome.delivery.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Version;

import com.yikome.common.BaseEntity;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Setter
@Getter
@NoArgsConstructor
@Entity
@Table(name = "d_delivery" , indexes = {@Index(columnList="storehouseId") , @Index(columnList="deliveryCode") , @Index(columnList="logisticsCode") , @Index(columnList="orderCode")})
public class Delivery extends BaseEntity {

	private static final long serialVersionUID = 1794413441124733053L;

	private Long storehouseId ; 
	
	@Column(length=50, unique = true)
	private String deliveryCode ; //发货单号
	
	private String orderCode ; 
	
	private BigDecimal deliveryPrice;
	
	private String currency ;
	
	private Integer status; //   已创建(0) | 已派单(10) | 已发货(20) | 已签收(30) | 已拒收(-20) | 已取消(-10)  
	
	private String remark ; //用户备注
	
	private String consignee;
	
	@Column(length=20)
    private String tel;
    
    private String contry ; 
	
	private String province ; 
	
    private String city;
    
    private String district;
    
    private String detail;
    
    private String zipCode ; 
    
    private String email ; 
    
    private String logisticsCode ;
    
    private String logisticsCompany ; 
    
    private BigDecimal shippingFreight ; //货代运费
    
    private BigDecimal paymentAmount ; //回款金额
    
    @Version
    private Integer version ; 
}